<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>JSSDK</title>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript" src="http://192.168.3.102/cdss/jssdk?v=4.0&ak=8D4FC73A88D985C1CF1772DA6A43EFD3"></script>
    <script type="text/javascript">
        var knowledge_huimei = {
            init:function () {
                var that = this;
                /*** autherEntity:客户认证信息 */
                HM.maysonLoader(that.autherEntity, function (mayson) {
                    //设置接入住院版浮窗对接方案
                    mayson.setDrMaysonConfig('m', 1);
                });
            },
            sendData:function (){
                var that = this;
                console.log("开始发送数据");
                HM.maysonLoader(that.autherEntity, function (mayson) {
                    //设置接入住院版浮窗对接方案
                    mayson.setDrMaysonConfig('m', 1);
                    // 回写监听
                    mayson.listenViewData = function (data) {

                    };
                    // 设置智能推荐请求参数 ( bean 详见参数文档)
                    mayson.setMaysonBean(that.bean);
                    //发送推荐请求
                    mayson.ai();
                });
            },
            autherEntity:{
                "autherKey": "8D4FC73A88D985C1CF1772DA6A43EFD3",
                "userGuid": '03643872',
                "doctorGuid": '1508',
                "serialNumber": '03643872+16',
                "department": "血液透析特殊门诊病房",
                "doctorName": "宋新宇",
                "hospitalGuid": "huimei",
                "customEnv": 1,
                "hospitalName": "惠每医疗"
            },
            bean:{
                "userGuid": "03643872",
                "serialNumber": "03643872+16",
                "patientName": "吴国名",
                "doctorGuid": "1508",
                "doctorName": "宋新宇",
                "admissionTime": "2020-06-30 09:43:13",
                "inpatientDepartment": "肾内科病房",
                "pageSource": 5,
                "patientInfo": {
                    "pregnancyStatus": "0",
                    "gender": 1,
                    "birthDate": "1981-12-27",
                    "age": "39",
                    "ageType": "岁",
                    "maritalStatus": "1"
                },
                "medicalOrders": [{
                    "orderId": "HD101560000000023",//医嘱编号 需要给血透系统定义一个
                    "doctorGuid": "1508",
                    "timelinessFlag": "2",// 长期临时标记 固定临时医嘱吗？
                    "orderClass": "1",//医嘱分类，默认住院医嘱
                    "orderType": "6",//医嘱类型 ，固定6手术？
                    "orderCode": "ZLTJ000106",//医嘱代码 需要给血透系统定义一个
                    "orderContent": "血液透析",
                    "createTime": "2020-12-11 17:55:46",
                    "executeTime": "",
                    "stopTime": "",
                    "orderFlag": "1"
                }]
            }
        }
        $(function (){
            //初始化知识库惠每组件
            knowledge_huimei.init();
            //制定处方调用惠每接口发送数据库到知识库
            $("#testButton").on("click",function (){
               knowledge_huimei.sendData();
            });
        });
    </script>
</head>
<body>
<div style="text-align: center">
    <button id="testButton">制定处方</button>
</div>
<!--正常部分 -->
<div class="col-xt-12 marquee" name="prescriptionCard" data-isKxbdMarquee="false">
    <input type="hidden" name="showPrescriptionCampainId" value="102250000001985">
    <ul>
        <li>
            <div class="col-xt-12"><span class="xt-span4" style="white-space:normal;">ATC：达肝素钠注射液(首剂:3100U)</span></div>
        </li>
        <li>
            <div class="col-xt-12"><span class="error">透析器：517G</span></div>
        </li>
        <li>
            <div class="col-xt-6 margin-top-12"><span class="xt-span4">超滤量：0</span></div>
        </li>
        <li>
            <div class="col-xt-6 margin-top-12">
                <span class="xt-span4">剩余时间：</span><span name="spDialysisTime" class="xt-span4"
                                                                                  data-last-time="9052" data-start-time="1623750000000">02:30</span>
            </div>
        </li>
        <li>
            <div class="col-xt-12 margin-top-12">
                <div class="col-xt-6"><span class="xt-span4 null" id="BP">BP：</span></div>
                <div class="col-xt-6"><span class="xt-span4" id="P">P：</span></div>
            </div>
    </li>
</ul>
</div>





<div class="col-xt-12 marquee" name="prescriptionCard" data-isKxbdMarquee="false">
    <input type="hidden" name="showPrescriptionCampainId" value="102250000001986">
    <ul>
        <li>
            <div class="col-xt-12"><span class="xt-span4" style="white-space:normal;">ATC：达肝素钠注射液(首剂:400U)</span></div>
        </li>
        <li>
            <div class="col-xt-12"><span class="error">透析器：HF15SD</span></div>
        </li>
        <li><span class="xt-span4"></span></li>
        <li>
            <div class="col-xt-6"><span class="xt-span4">超滤量：0</span></div>
            <div class="col-xt-6">
                <span class="xt-span4">剩余时间：</span>
                    <span name="spDialysisTime" class="xt-span4"
                          data-last-time="14400" data-start-time="">04:00</span>
            </div>
        </li>
    </ul>
</div>
</div></div>


</body>
</html>